using UnityEngine;
using System.Collections;

public class MiniGunBullets : MonoBehaviour {
	
	public float Damage = 10;
	
	// Use this for initialization
	void Start () 
	{
		Destroy (this.gameObject,3);
	}
	
	// Update is called once per frame
	void Update () 
	{
	
	}
	
	void OnTriggerEnter(Collider col)
	{
		if(col.gameObject.tag == "Enemy")
		{
			col.gameObject.GetComponent<EnemyHealthController>().Damage(Damage);
			Destroy(this.gameObject);
		}
	}
}
